<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增空闲工时')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content" id="cxSelect">
        <form class="form-horizontal m" id="form-projectHour-add">
            <input type="hidden" name="userId" th:value="${userId}" />
            <input type="hidden" name="type" value="3" >

            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">工时：</label>
                <div class="col-sm-8">
                    <input name="workHour" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">工时日期：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="workDate"  th:value="${#dates.format(new java.util.Date(), 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text" required>

                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">工时内容：</label>
                <div class="col-sm-8">
                    <textarea name="description" class="form-control" rows="8" required></textarea>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <th:block th:include="include :: jquery-cxselect-js" />
    <script th:inline="javascript">
        var prefix = ctx + "erp/projectHour"
        $("#form-projectHour-add").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/add", $('#form-projectHour-add').serialize());
            }
        }


    </script>
</body>
</html>